package com.iwhalecloud.citybrain.flow.platform.manager.application.service.impl.task;

import com.iwhalecloud.citybrain.flow.platform.manager.application.service.FlowFormHistoryService;
import com.iwhalecloud.citybrain.flow.platform.manager.application.service.TaskCompletedPostProcessor;
import org.flowable.task.service.impl.persistence.entity.TaskEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author SiJiang
 * @createTime 2021/8/9 10:16 上午
 * @description
 */
@Service
public class TaskFlowFormHistoryRecordProcessor implements TaskCompletedPostProcessor {
    @Autowired
    private FlowFormHistoryService flowFormHistoryService;
    @Override
    public void process(TaskEntity taskEntity) {
        flowFormHistoryService.recordTaskHistoryExternalForm(taskEntity.getId());
    }

    @Override
    public String getDesc() {
        return "流程表单历史记录处理";
    }
}
